package com.vehicle.service;

import com.vehicle.bean.DataGridView;
import com.vehicle.bean.UserVo;
import com.vehicle.pojo.User;

import java.util.Set;

public interface UserService {
    //登陆login
    public User findUserByUid(String uname, String password);
    //分页查询
    public DataGridView findUsersBypage(UserVo userVo);
    //增加用户
    public  void  addUser (User user)throws RuntimeException;
    //删除用户
    public  void  deleteUser(Integer uid);
    //修改用户
    public  void    updateUser(User user);
    //根据电话号码查询用户
    public User findUserByTelephone(String uname);
    //分配角色
    public void assignRole(Integer uid,Integer[]  rids);

    //shiro认证登录
    public User findUserByUname(String uname);

    //shiro授权
    public Set<String> findRolesNameByUname(String uname);

    public Set<String> findPercodesByUname(String uname);


    //修改密码
    public void changePwd(User user,String newPsw1,String newPsw2);

    //根据id查询user
    public  User findUserById(Integer uid);

    //批量修改状态为0
    public  void  updateAvailable(Integer[] uids);


    //启用禁用
    public void updateStatusOneZero(User  user);


}
